package com.jic.market.api.rest;

import com.jic.common.base.vo.RestResult;
import com.jic.market.request.rest.bargain.MyBargainResponse;
import com.jic.market.request.rest.groupon.*;
import com.jic.market.response.rest.groupon.LaunchGrouponDetailResponse;
import com.jic.market.response.rest.groupon.LaunchOrJoinGrouponResponse;
import com.jic.market.response.rest.groupon.PostPayGroupInstDetailResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * description: GrouponRestApi
 * date: 2020/4/27 20:20
 * author: wangys
 * version: 1.0
 */

@FeignClient(name = "jic-market", path = "/rest/groupon")
public interface GrouponRestApi {

    @PostMapping("/launch-or-join-groupon-check")
    RestResult<LaunchOrJoinGrouponResponse> launchOrJoinGrouponCheck(@RequestBody LaunchOrJoinGrouponRequest request);

    @PostMapping("/launch-or-join-groupon")
    RestResult<LaunchOrJoinGrouponResponse> launchOrJoinGroupon(@RequestBody LaunchOrJoinGrouponRequest request);

    @PostMapping("/launch-groupon-detail")
    RestResult<LaunchGrouponDetailResponse> launchGrouponDetail(@RequestBody LaunchGrouponDetailRequest request);

    @PostMapping("/launch-groupon-product-detail")
    RestResult<List<MyBargainResponse>> launchGrouponProductDetail(@RequestBody MyBargainRequest request);

    @PostMapping("/post-pay-group-inst-detail")
    RestResult<PostPayGroupInstDetailResponse> postPayGroupInstDetail(@RequestBody PostPayGroupInstDetailRequest request);

    @PostMapping("/cancelPayGroupInstDetail")
    RestResult<PostPayGroupInstDetailResponse> cancelPayGroupInstDetail(@RequestBody CancelPayGroupInstDetailRequest request);

}
